#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QThread>
#include <QMutex>
#include "txh_FFmpeg.h"
#include "txh_SDL2.h"

#define MAX_BUF_SIZE 10*1024*1024

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

typedef enum{
    STOP,
    START,
    PAUSE
}Play_status;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButtonPlay_clicked();

    void on_pushButtonPause_clicked();

    void on_pushButtonStop_clicked();

    void on_pushButtonOpen_clicked();

signals:
    void play_file(QString path_file);
    void play_control(int status);

private:
    Ui::MainWindow *ui;
    QString file_path;
    QThread *thread;
    Play_status play_status;
    bool first_frame;
};
#endif // MAINWINDOW_H
